#include<iostream>
using namespace std;
int a[501];
int b[501];
//int temp[501];
char summ[501];
int main()
{
//	char ch ;

//	while (cin >> ch && ch != '\n') {
//		cin >> a[cnt_a];
//	}
//	while (cin >> ch && ch != '\n') {
//		cin >> b[cnt_a];
////	}
//	gets(a);
//	gets(b);
	int cnt_a = 0;
	int cnt_b = 0;
	int nnn;
	while (scanf("%d", &nnn)) {
		a[++cnt_a] = nnn;
	}
	while (scanf("%d", &nnn)) {
		b[++cnt_b] = nnn;
	}
//	int cnt_a = sizeof(a) / a[0];
//	int cnt_b = sizeof(b) / b[0];
	int maxxx = cnt_a > cnt_b ? cnt_a : cnt_b ;
	int cha = cnt_a - cnt_b;// zuo cha
	for (int i = 0; i <= maxxx; i++) {
		if (i + cha < 0 ) {
			summ[i + 1] = a[i];
			continue;
		}
		summ[i + 1] = a[i] + b[i + cha] ;
		if (summ[i + 1] > 10)summ[i] += 1;
	}

//	for (int i = 0; i < cnt_a; i++) {
//		a[i] = temp[cnt_a - i - 1];
//	}
//	while (cin >> ch && ch != '\n') {
//		cin >> temp[cnt_a];
//	}
//	for (int i = 0; i < cnt_a; i++) {
//		b[i] = temp[cnt_a - i - 1];
//	}
//	int maxxx = cnt_a > cnt_b ? cnt_a : cnt_b ;
//	for (int i = 0; i <= maxxx; i++) {
//		summ[i] = a[i] + b[i];
//		if (summ[i] > 10) summ[i + 1] += 1;
//	}
	for (int i = 0; i > maxxx; i++) {
		cout << summ[i];
	}
	return 0;
}
